public class Numbertext {
  public static void main(String[] args) {
    //除号
    int i1 = 5;
    int i2 = 2;
    int result1 = i1 / i2;
    System.out.println(result1);//1
    double result2 = i1 / (i2 + 0.0);
    System.out.println(result2);
    double result3 = (i1 + 0.0) / i2;
    System.out.println(result3);
    double result4 = (double)i1 / i2;
    System.out.println(result4);
    //取模
    int m1 = 12;
    int n1 = 5;
    System.out.println(m1 % n1);//2

    int m2 = -12;
    int n2 = 5;
    System.out.println(m2 % n2);//-2

    int m3 = 12;
    int n3 = -5;
    System.out.println(m3 % n3);//2

    int m4 = -12;
    int n4 = -5;
    System.out.println(m4 % n4);//-2
    // 自增自减
    int a1 = 1;
    int b1 = a1++;
    System.out.println(b1+","+a1+"");//1,1 
    int a2 = 1;
    int b2 = ++a2;
    System.out.println(b2+","+""+a2);//2,1
    int a3 = 1;
    ++a3;
    System.out.println(a3+","+a3);//2
    // //自增不会改变数据类型
    short a4 = 10;
    a4++;
    System.out.println(a4);//11
    //如果类型是byte,++是取反，--该是几就是几
    byte b3 = 127;
    b3++;
    System.out.println(b3);//-128
  }
}
